
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE>
<html>
<head>
 <p>Hello World</p>
 <script src="${pageContext.request.contextPath}/static/js-lib/bootstrap/js/jquery.js"></script>
 <script src="${pageContext.request.contextPath}/static/js-lib/bootstrap/js/bootstrap.min.js"></script>
 <link rel="stylesheet" href="${pageContext.request.contextPath}/static/js-lib/bootstrap/css/bootstrap.min.css">
</head>
<body>

<button type="button" class="btn btn-info" id="logoOutBt"> 退出登陆</button>
<button type="button" class="btn btn-info" id="socketTest">webSocket</button>
<script>
 $("#logoOutBt").click(function(){
     $.post("${pageContext.request.contextPath}/logout",{},function(data){

         if(data.resultCode=="SUCCESS"){
             window.location.href="${pageContext.request.contextPath}/index.html";//跳到主页
         }
     },'json');
 });
 $("#socketTest").click(function(){
     window.location.href = "${pageContext.request.contextPath}/sys/attach/webSocket";
 });

</script>
</body>
</html>
